<extend name="Public/List/Common"/>

<block name="pageContent">
    <div class="bjui-pageContent tableContent">
        <table data-toggle="tablefixed" data-width="100%" data-nowrap="true">
            <thead>
            <tr>
                <th>
                            编号                        </th><th>
                            用户ID                        </th><th>
                            创建时间                        </th><th>
                            点击数量                        </th><th>
                            状态                        </th>
                <th>回答状态</th>
                        <th>问题内容</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            
                <volist name="askList" id="vo">
            
            <tr>
                <td>{$vo.id}</td>
                <td>
                <?php
                    $where['id'] = $vo[uid];
                    $result = M('ucenter_member')->where($where)->find();
                    echo $result['mobile'];
                ?>
                </td>
                <td>{$vo.create_time|time_format}</td>
                <td>{$vo.view}</td>
                <td>{$vo.status|columnToName="DEFAULE_STATUS",###}</td>
                <td>
                    <?php
                    $a = M('answer')->where('ask_id='.$vo['id'])->find();
                    if($a){echo '已回答';}else{echo '未回答';}
                    ?>
                </td>
                <td width="35%" style="white-space:inherit;">{$vo.content}</td>
                <td>
                    <!--<a href="{:U('answerList?id='.$vo['id'])}" class="btn btn-green"
                        data-toggle="navtab" data-id="add{$vo['id']}"
                                               data-title="答案选择">答案选择</a>-->
                    <a href="{:U('answer?id='.$vo['id'])}" class="btn btn-green"
                       data-toggle="dialog" data-id="dialog-normal" data-mask="true"
                       data-title="提问回答">我来回答</a>

                    <a href="{:U('edit?id='.$vo['id'])}" class="btn btn-green"
                        data-toggle="dialog" data-id="dialog-normal" data-mask="true"
                                               data-title="详细">详细</a>
                    <a href="{:U('toggleStatus?id='.$vo['id'])}" class="btn btn-{$vo['status']==0?'blue':'red'}"
                            data-toggle="doajax" data-confirm-msg="确定要删除该行信息吗？">{$vo['status']==0?'启用':'禁用'}</a>                    <a href="{:U('del?id='.$vo['id'])}" class="btn btn-red"
                       data-toggle="doajax">删除</a>
                </td>
            </tr>
            
                </volist>
            
            </tbody>
        </table>
    </div>
</block>